<?php

$container = $app->getContainer();

$container['db'] = function ($c){
     $db = $c->get('settings')['db'];
     return new \Medoo\Medoo([
        'database_type' => $db['drive'],
	    'database_name' => $db['dbname'],
	    'server' => $db['host'],
	    'username' => $db['username'],
	    'password' => $db['password'],
        'charset' => 'utf8',
	    'port' => $db['port'],
     ]);
    };
